Skip to content

Conversation

@Pankraz76
Copy link
Owner

@Pankraz76 Pankraz76 commented Nov 10, 2025


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

* @param clazz the class to check; never {@code null}
* @return {@code true} if the class is {@code public}
* @see java.lang.reflect.Modifier#isPublic(int)
* @see Modifier#isPublic(int)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only this unrelated change is quite impressive having a very modern codebase.

Changes have been made to junit-platform-commons/src/main/java/org/junit/platform/commons/support/ModifierSupport.java by:
    org.openrewrite.java.migrate.UpgradeToJava17
        org.openrewrite.java.migrate.RemovedModifierAndConstantBootstrapsConstructors
            org.openrewrite.java.ChangeMethodTargetToStatic: {methodPattern=java.lang.reflect.Modifier *(..), fullyQualifiedTargetTypeName=java.lang.reflect.Modifier}

@Pankraz76 Pankraz76 changed the title [prone] Add StreamRulesRecipes [picnic] Add StreamRulesRecipes Nov 10, 2025
Comment on lines +13 to +14
apply(from = "gradle/rewrite.gradle")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply from is an anti-pattern, and JUnit bundles build plugins under https://github.com/Pankraz76/junit5/tree/main/gradle/plugins

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks for the update. I can see where this is going, but I currently don’t have any idea how to fix it.

Can we handle this later, or could someone else please add it?

I’ve seen a similar approach from Elastic — it’s quite nice and straightforward, almost just a copy-and-paste calling the same API in the code configuration, like from a Gradle file.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho this is not possible yet right? as the api does not offer rewrite, yet...

Changes have been made to junit-platform-commons/src/main/java/org/junit/platform/commons/support/ModifierSupport.java by:
    org.openrewrite.java.migrate.UpgradeToJava17
        org.openrewrite.java.migrate.RemovedModifierAndConstantBootstrapsConstructors
            org.openrewrite.java.ChangeMethodTargetToStatic: {methodPattern=java.lang.reflect.Modifier *(..), fullyQualifiedTargetTypeName=java.lang.reflect.Modifier}

Signed-off-by: Vincent Potucek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants